#!/usr/bin/python
# -- coding:utf8 --

"""
验证码
营销
放款
到期
逾期
还款

"""
# 考虑要不要 apply

""" 
lo@n->loan      
Ioan->loan 
l0an->loan

提取机构名称的时候：不做处理
匹配关键词的时候：先转小写 仅保留 数字，字母，空格 
不匹配 “ mb |GlobeOne|smart”

SMART 也是运营商
"""

sms_dele_key = " mb | gb "

sms_cash_key = "approve|loan|application|apply|interest|cash|borrow|credit|utang|registration|interes| up to "

sms_loan_key1 =  'loan amount has been transferred|congrats on your loan application approval'
sms_loan_key2 = "|you have successfully withdrawn"
sms_loan_key3 = "|has been disbursed to your account|loan amount .* has been successfully deposited to your account"
sms_loan_key4 = '|last payment of php \d+ for your account ending \d+ was posted on|php loan has been transferred to your account'
sms_loan_key5 = "|loan amount .* has been transferred|has been approved and deposited into your account"
sms_loan_key6 = "|loan has been successfully transferred to your bank account"
sms_loan_key7 = "|calamity loan has been approved .* you can claim now your reloan after you settled your existing balance"
sms_loan_key8 = "|napadala ang php \d+ sa iyong bank account|loan on .* has been disbursed|have successfully withdrawn"
sms_loan_key9 = "|php.* is sent to account|php \d+ to your payout account|php \d+ sa iyong bank account bank"
sms_loan_key10 = "|your loan .* has been disbursed amount received|php \d+ is sent to account card"
sms_loan_key11 = "|php \d+ is sent to ccount card|your loan amount has been transferred"
sms_loan_key12 = "|you have passed the audit we are paying php|your loan \d+ has been approved the remittance center"
sms_loan_key13 = "|have arranged under the recorded line that payment will be done today|sent you php \d+ please bring"
sms_loan_key14 = "|congratulations your loan amount \d+ has been successfully|iyong php \d+ loan ay inilaan na sa iyong isinumiteng account"
sms_loan_key15 = "|you have recieved \d+ to your account|php \d+ has been transferred to account"
sms_loan_key16 = "|\d+ arrives in your account|loan amount \d+ has been successfully|php \d+ mo pakihulog na sa account"
sms_loan_key17 = "|loan application in east cash has been approved you can check the balance"
sms_loan_key18 = "|loan \d+ has been transferred|loan has been sent to your accountplease check"
sms_loan_key19 = "|loan php \d+ in our company has been successfully|your loan \d+ has been transfer"
sms_loan_key20 = "|\d+ has been disbursed please check|php \d+ to your payout account"
sms_loan_key21 = "|loan .* has been approved please have ready your id card|loan has been approved and credited to your account"
sms_loan_key22 = "|loan application for p\d+ filed on \d+ was approved|loan proceeds has been creditted to account"
sms_loan_key23 = "|loan in lifebank is php \d+ loan disbursement|na ang loan sa iyong online account"
sms_loan_key24 = "|ang loan ay naipadala na sa (gcash|iyong gcash) account"
sms_loan_key25 = "|loan has approved and disbursed your loan to your .* account|loan \d+ php is disbursed repay"
sms_loan_key26 = "|loan \d+ php has been granted repay via|loan \d+ is approved you can now sign your loan contract"
sms_loan_key27 = "|loanamount\d+ has been released successfully"
sms_loan_key28 = "|loan application has been approved under agreement|loan has been released successfully through"
sms_loan_key29 = "|loan has been transferred to youplease|loan has been transferred to your .* account"
sms_loan_key30 = "|loan has been approved .* has successfully disbursed to your .* account"
sms_loan_key31 = "|loan application \d+ has been approved kindly login to the my home credit|has been approved kindly proceed with contract"
sms_loan_key32 = "|has been approved kindly return to the store to proceed with contract|php \d+ is paid to your loan in cash on "
sms_loan_key33 = "|short term loanstl application has been approved"
sms_loan_key34 = "|multipurpose loan application has been forwarded to pagibig fund|your application for pagibig housing loan under housing account no ending"
sms_loan_key35 = "|billease application has been approved time to go shopping|iyong loan ay amin nang naitransfer sa iyong gcash account"
sms_loan_key36 = "|has been transferred to your account|your afpslai salary loan has been approved"
sms_loan_key37 = "|loan application w refno mc\d+ is approved please login|your \d+ php loan is issued total amount due is"
sms_loan_key38 = "|\d+ php additional amount is issued total amount due|your installment loan of p\d+ for \d+ months is approved"
sms_loan_key39 = "|p\d+ will be deposited to your (gcash|bank|grabpay wallet|paymaya) account today|your p\d+ will be deposited to your (gcash|bank) account"
sms_loan_key40 = "|loan \d+ has been released successfully|your loan application for .* has been approved|your loan has been approved please login to withdraw"
sms_loan_key41 = "|loan b\d+ has been approved by pfi|your loan has been released successfully|loan application has been approved \d+ amount \d+"
sms_loan_key42 = "|sent your loan to your account|sent a total of php\d+ to your coinsph account|your account ending in \d+ has been successfully credited"
sms_loan_key43 = "|successfully borrowed .* to pay your loan|you have received php\d+ of gcash from gloan"
sms_loan_key44 = "|loan application has been approved by|loan amount is \d+p and the loan has been successfully"
sms_loan_key45 = "|leongonloan gross approved\d+net loan \d+ interest|loan of php\d+ was disbursed to your designated account"
sms_loan_key46 = "|loan amounting to p\d+ was processed successfully|loan you applied for \d+ php has been approved and will be issued"
sms_loan_key47 = "|loan was approved for p\d+ the net proceeds is p\d+|your \d+ loan has been disbursed"
sms_loan_key48 = "|have been successfully approved \d+php\d+ days funds will arrive at your designated account"
sms_loan_key49 = "|\d+ has been disbursed repay on time|send funds to your account 100000 php|\d+ transferred to your account please check"
sms_loan_key50 = "|loan got approved money will be disbursed within 1 business day|sent you php \d+ message from sender"
sms_loan_key51 = "|loan b\d+ that was approved by pfi has been transferred to your bank account|processing and approved your account for reloan today"
sms_loan_key52 = "|congrats on your loan application approval thanks for trusting|your payment 1500 has posted on \d+|nailipat na sa inyong banko"
sms_loan_key53 = "|loan ay naipadala na sa iyong paymaya account|your loan application under the landbank electronic salary loan"
sms_loan_key54 = "|contract money 9054374 has been transferred to your bank|your loan has arrived please withdraw money"
sms_loan_key55 = "|has been approved kindly wait for your client then proceed with contract|your personal loan proceeds have been credited to your settlement account"
sms_loan_key56 = "|loan proceeds has been credited to your acct|payment of php \d+ to psbank loans on may .* was processed successfully"
sms_loan_key57 = "|success your funds have been released|your \d+ php additional amount is issued|your \d+ loan has been disbursed"
sms_loan_key58 = "|congrats ang iyong utang ay inilipat sa iyong account sa bank|loan ay naipadala na sa grabpay account"
sms_loan_key59 = "|loan ay naipadala sa iyong bank account|loan has disbursed to you bank account|your loan has been credited to your pledge account"
sms_loan_key60 = "|congratulations your \d+ day \d+ php loan application has been approved and will be released within"
sms_loan_key61 = "|your application has been approved your control number is|contract money \d+ has been transferred to your bank account"
sms_loan_key62 =  "|have been successfully approved \d+ php\d+ days funds will arrive at your designated account"
sms_loan_key63 = ""
sms_loan_key1_30 = (sms_loan_key1+sms_loan_key2+sms_loan_key3+sms_loan_key4+sms_loan_key5+
                    sms_loan_key6+sms_loan_key7+sms_loan_key8+sms_loan_key9+ sms_loan_key10+
                    sms_loan_key11+sms_loan_key12+sms_loan_key13+sms_loan_key14+sms_loan_key15+
                    sms_loan_key16+sms_loan_key17+sms_loan_key18+sms_loan_key19+sms_loan_key20+
                    sms_loan_key21+sms_loan_key22+sms_loan_key23+sms_loan_key24+sms_loan_key25+
                    sms_loan_key26+sms_loan_key27+sms_loan_key28+sms_loan_key29+sms_loan_key30)
sms_loan_key31_60 = (sms_loan_key31+sms_loan_key32+sms_loan_key33+sms_loan_key34+sms_loan_key35+
                     sms_loan_key36+sms_loan_key37+sms_loan_key38+sms_loan_key39+sms_loan_key40+
                    sms_loan_key41+sms_loan_key42+sms_loan_key43+sms_loan_key44+sms_loan_key45+
                    sms_loan_key46+sms_loan_key47+sms_loan_key48+sms_loan_key49+sms_loan_key50+
                     sms_loan_key51+sms_loan_key52+sms_loan_key53+sms_loan_key54+sms_loan_key55+
                    sms_loan_key56+sms_loan_key57+sms_loan_key58+sms_loan_key59+sms_loan_key60
                     +sms_loan_key61+sms_loan_key62+sms_loan_key63
                     )
sms_loan_key =  sms_loan_key1_30+sms_loan_key31_60
sms_loan_key = sms_loan_key.lower()

""" 还款 """

sms_repayment_key1 = 'your successful repayment|loan has been paid|your repayment p\d+ has been received'
sms_repayment_key2 = '|payment of php \d+ for your account ending \d+ was posted on|have successfully repaid php \d+'
sms_repayment_key3 = '|we have received your payment of p|loan payment successfully collected|loan has been successfully repaid'
sms_repayment_key4 = '|thank you for your payment for loan|thank you for your loan payment amounting|thank you for your payment of p'
sms_repayment_key5 = '|you paid billease php|your loan \d+ has already been settled|your payment of .* has been successfully'
sms_repayment_key6 =  '|your transaction to .* with fee p\d+ has been processed|your repayment for loan .* has been received'
sms_repayment_key7 =  '|your repayment p\d+ has been received|your loan of p\d+ was successfully settled|repayment p\d+ was received'
sms_repayment_key8 =  '|your loan p\d+ has been paid off successfully|your payment of .* has been successfully received'
sms_repayment_key9 = '|loan has been settled|we received your full payment|we have received your partial payment|your loan payment of php \d+ was received'
sms_repayment_key10 = '|have received your payment amount|your payment .* has been successfully processed|has been processed and your payment will be posted'
sms_repayment_key11 ='|your repayment is successful php|your payment has been settled|payment p\d+ has been received please repay'
sms_repayment_key12 = "|you paid php\d+ from your maya account to dragon loans with account|your loan (php\d+|p\d+|\d+) has already been settled"
sms_repayment_key12 = "|you have successfully paid p\d+ for your ggives loan|you have paid php \d+ for maya cash in using your bpi account"
sms_repayment_key13 = "|you have paid php \d+ with php 000 fee for seabank philippines cash|successfully paid p\d+ to tala loan"
sms_repayment_key14 = "|received payment on your personal loan amounting|confirm your arrangement to pay php \d+ on \d+ as payment for your bdo auto loan"
sms_repayment_key15 = "|your pay loan transaction amounting to php \d+ was successfully"
sms_repayment_key16 = "|congratulations on your successful repayment|remitting your home credit payment p\d+"
sms_repayment_key17 = "|loan the collector just received your payment the amount is php|successfully repaid your loan|settled the 1st installment of the loan"
sms_repayment_key18 = "|loan has been paid your credit|received your payment of p\d+|your payment has been posted"
sms_repayment_key19 = "|has been posted as loan payment thank you|thank you for paying p\d+ on|salamat sa pagbayad ng halagang php\d+"
sms_repayment_key20 = "|thank you for paying p\d+ with|received and posted phpphp \d+ as payment for your loan"
sms_repayment_key21 = "|payment of php \d+ from your gsave account \d+ to your personal loan|thank you for paying php \d+ for your pagibig multipurpose loan"
sms_repayment_key22 = "|autodebit payment for your personal loan ending|you paid php\d+ from your maya account"
sms_repayment_key23 = "|you paid php \d+ to ud loans|successfully paid p\d+ for your|you have paid p\d+ to the sm store"
sms_repayment_key24 = "|paid tala php \d+ payment|received loan\d+total paid \d+|received your p\d+ payment paid"
sms_repayment_key25 = "|loan is fully paid and you (can|may) now use the loans|loan is fully paid to use the service again"
sms_repayment_key26 = "|fully paid ka na at pwede mo na ulit gamitin|loan is now fully paid its gdayeveryday|loan payment of php \d+ has been received"
sms_repayment_key27 = "|thank you for your payment of p|bayad na ang iyong php \d+ na loan|paid php\d+ and biller convenience fee of php\d+ to home credit"
sms_repayment_key28 = "|your maya credit duesyour updated wallet balance is php \d+|paid php\d+ and biller convenience fee of php"
sms_repayment_key29 = "|installment has been repaid|thank you for your payment on \d+amounting php|youve already settled"
sms_repayment_key30 = "|payment of php .* your personal loan|loan payment collected amount collected"
sms_repayment_key31 = "|thank you for completing the payments for your ggives loan account|you have paid php\d+ from your paymaya account to home credit"
sms_repayment_key32 = "|your bill has settled|success you paid php|success your funds have been received|we received your payment \d+ php"
sms_repayment_key33 = "|you paid p\d+ via truemoney to home credit|you paid php \d+ to home credit|you paid tala php \d+"
sms_repayment_key34 = ""
sms_repayment_key1_10 = (sms_repayment_key1+sms_repayment_key2+sms_repayment_key3+sms_repayment_key4+
                         sms_repayment_key5+sms_repayment_key6+sms_repayment_key7+sms_repayment_key8+sms_repayment_key9+ sms_repayment_key10)

sms_repayment_key11_20 = (sms_repayment_key11+sms_repayment_key12+sms_repayment_key13+sms_repayment_key14+sms_repayment_key15
                          +sms_repayment_key16+sms_repayment_key17+sms_repayment_key18+sms_repayment_key19+sms_repayment_key20)

sms_repayment_key21_30 = (sms_repayment_key21+sms_repayment_key22+sms_repayment_key23+sms_repayment_key24+sms_repayment_key25
                          +sms_repayment_key26+sms_repayment_key27+sms_repayment_key28+sms_repayment_key29+sms_repayment_key30
                          +sms_repayment_key31+sms_repayment_key32+sms_repayment_key33
                          )
sms_repayment_key = sms_repayment_key1_10+sms_repayment_key11_20+sms_repayment_key21_30
sms_repayment_key = sms_repayment_key.lower()


""" 到期提醒 """
"""
去掉key settle your account today| 
|your partial payment of p
"""

"""
re.search("due date (?!alert|warningwe)|para makapag","days at hindi due date alxert warningwe need your se  masu")
re.search("(?<!hindi magkaroon ng) past due|para makapag","days at hindi x magkaroon ng past due interestmasu")

"""
"""
re.search("due date (?!alert|warningwe)|para makapag","days at hindi due date alxert warningwe need your se  masu")
re.search("(?<!hindi magkaroon ng) past due|para makapag","days at hindi x magkaroon ng past due interestmasu")
|(?<!no) collection (?!.*(?:message|collected by))| utang (?!na load)"

(?!.*(?:na load|ay inilipat sa iyong))
'|(?<!specific installment) due date (?!alert|warningwe)'
"""


sms_expire_key1 = " duedate | dueday | ay due "
sms_expire_key2 = '|(?<!specific installment) due date (?!alert)(?!warningwe)'
sms_expire_key3 = '|kindly process the balances now|your current loan payment|settle your account in advance'
sms_expire_key4 = '|your due for bill date|with release date of|due datepls|\d due date'
sms_expire_key5 = '|due to insufficient balance of your source account|paki process na po ng payment'
sms_expire_key6 = "|you don't have enough balance to complete your payment|you can claim now your reloan after you settled your existing balance"
sms_expire_key7 = "|forgotten to settle your outstanding amount due|nagtatangka na mang scam sa"
sms_expire_key8 = "|current amount to pay of php\d+ for your globe at home account number"
sms_expire_key9 = "|your approved loan expires soon"
sms_expire_key10 = "|your due for bill date \d+ is \d+ kindly disregard|we have not received any response in regards your outstounding loan"
sms_expire_key11 = "|not successful due to insufficient balance of your source account|plan to repay tala p \d+"
sms_expire_key12 = "due date\d+|due last"
sms_expire_key13 = "|full payment naprincipal amount na lang ang"
sms_expire_key14 = "| due today|you still unpaid your previous loan"
sms_expire_key15 = ""
sms_expire_key16 = "|bill with \d+ will be due tomorrow"
sms_expire_key17 = "|pay your loan today and avail the vip offers"
sms_expire_key18 = "|no payment hasnt been processed on your account|immediatelyif you have already settled your payment"
sms_expire_key19 = "|your payment now until 1pmafter paying process your reloan immediately|na wala po tayong loan extension at partial payment"
sms_expire_key20 = "|maaari lamang pakisagot ang aming tawag upang magkaroon ng magandang komunikasyon tungkol sa inyong account"
sms_expire_key21 = "|maaari ka nang makapagbayad ngayong arawdahil|encourage you to make way even partial payment|we highly advice kindly process your payment now"
sms_expire_key22 = "|kapag makakapagsettle kayo ngayon araw magreply|makapagbayad ngayong arawdahil isa ka sa napili|encourage you to make way even partial payment"
sms_expire_key23 = "|amount due ay php\d+"
sms_expire_key24 = 'is due|just settle your previous loan|settle your payment today in advance|you could pay today in any branch of payment channels'
sms_expire_key25 = "|pay principal \d only today \d to close the account"
sms_expire_key26 = "|dues by \d+"
sms_expire_key27 = "|due to be paid on \d+"
sms_expire_key28 = "|settle your account as early"
sms_expire_key29 = "|payment po mag kusa ka naman mag bayad ng utang"
sms_expire_key30 = "|rollover payment amount \d+ pesos"
sms_expire_key31 = "|expiring on|promised to settle today"
sms_expire_key32 = ""
sms_expire_key33 = "|bill was due \d+ kindly settle|paying advance will help you to get a good credit"
sms_expire_key34 = ""
sms_expire_key35 = ""
sms_expire_key36 = ""
sms_expire_key37 = "|last chance we demand that the payment be made by"
sms_expire_key38 = "|para sa loan \d+ you can still pay on|pay your loan in advance|amount was due"
sms_expire_key39 = "|advance installment for loan \d+ on or before|your loan will be overdue tomorrow"
sms_expire_key40 = ""
sms_expire_key41 = "|higher penalty interests if overdue"
sms_expire_key42 = "|installment ng \d+ ay dapat bayaran sa \d+|installment para sa loan \d+ na p\d+ ay pwede nang bayaran ngayon"
sms_expire_key43 = "|loan \d+ ay dapat bayaran bago \d+|hc card acct\d+ ay due na today|monthly payment mo ay due na today"
sms_expire_key44 = "|monthly payment ay due na today|monthly payment for loan \d+ ay due na today"
sms_expire_key45 = "|payment po ninyo makikisuyo na po need to ensure po ng payment today|are you ready to repay tala|are you ready to repay your tala"
sms_expire_key46 = "|partial payment po sana today"
sms_expire_key47 = "|due on |due on\d+"
sms_expire_key48 = "|advance payment"
sms_expire_key49 = "|loan due is today|settle mo ito today ang next reloan"
sms_expire_key50 = "|kung maaga ka makakapagbayad|not received the payment due \d+"
sms_expire_key51 = "|payment for your billease|gentle reminder on your payment please settle"
sms_expire_key52 = "|settling your debt today|account is already due"
sms_expire_key53 = "|repaying your tala loan sooner|settle now avail our promoreloan up to"
sms_expire_key54 = "|repayment agreement will end tomorrow|bill is about to overdue"
sms_expire_key55 = "|loan payment due today|after you settle your payment you can claim your next re loan"
sms_expire_key56 = "|your due today|possible longer terms once you settle your payment|request you need to pay the extension fee p\d+"
sms_expire_key57 = "|pay kusog pera early"
sms_expire_key58 = "|upcoming due|settle ng payment your accoun| is due |settle your pesoloan account today| due today"
sms_expire_key59 = "|\d+ php is for tomorrow|payment bago ang cut off time"
sms_expire_key60 = "|was due today"
sms_expire_key61 = "|was already due|must be settled by|due for payment on|total amountphp \d+ amount paidphp \d+"
sms_expire_key62 = "|repay in advance|rapay in advance|due day today"
sms_expire_key63 = "|payment now bigger reloan amount|settlement before|last repayment date|settling your \d+ today"
sms_expire_key64 = "|duedue tomorrow|is p\d+ due|total amount to be repaidphp|payment in advance| due tomorrow|remind you of your outstanding balance"
sms_expire_key65 = "|repay your tala loan in \d+ days|payment date|loan of p\d+ tomorrow|will be due"
sms_expire_key66 = "|on time isettle ang p\d+|on time remember to pay p\d+|days due \d+"
sms_expire_key67  = "|Statement date|dapat bayaran bago \d+|are now due|if your going to settle your payment|today is your loan of \d+p due"
sms_expire_key68  = "|expire today"
sms_expire_key69 = "|last day(?!.*points|.*games|.*travel|.*click borrow|.*up to)|settle your account in advance|arrangement with us today"
sms_expire_key70 = "|to expire| due by \d+|due na sa \d+|today is your repayment day|promised to pay|promised to make a payment"
sms_expire_key71 = "|deducted from your loan on|pay (p\d+|\d+) on or before \d+"
sms_expire_key72 = "|pay your loan early|are due|(?<!code)(?<!it)(?<!coupon)(?<!points earned)(?<!this) will expire|waiting sa payment|fail to pay your loan"
sms_expire_key73 = "|pay .* on time|settle your loan bago mag cut off time|you can pay early|repay your loan in \d+ days|repay your loan on"
sms_expire_key74 = "|if you are unable to repay|be paid as early as today|are expiring|with tala is to repay by|today is your duedate"
sms_expire_key75 = "|today is your recommended payment day|you are scheduled to pay|must immediately pay today|need to settle this today"
sms_expire_key76 = "|min due|expired on|you promised to pay \d+pesos on \d+|pay your loans early"
"""
注销
|is due tomorrow|is due for payment|php is due|is due tomorrow|account is due
|duedate is on|duedate is coming|duedate reminders|duedate mo|ngayon ang iyong duedate|duedate \d+
|duedate on your loan|today po ang ang duedate
|ngayon po ang inyong duedate|isettle account mo bago ang araw ng duedate|is your duedate|after few hours your loan will duedate|duedate today
|due on \d+|pay your loan now|repayment amount php
|namin kayong pinautang kaya naman inaasahan naming madali
|several verbal and written request|kailangan nyo na pong bayaran ang kinuhang loan account
|promise to pay|payment before|paying \d+ now|pay \d+ now|pay now extension
|nagexpire|hurry settle your account
|amount as of today php
"""
sms_expire_key1_10 = (sms_expire_key1+sms_expire_key2+sms_expire_key3+sms_expire_key4+sms_expire_key5
                      +sms_expire_key6+sms_expire_key7+sms_expire_key8+sms_expire_key9+sms_expire_key10)
sms_expire_key11_20 =(sms_expire_key11+sms_expire_key12+sms_expire_key13+sms_expire_key14+sms_expire_key15
                      +sms_expire_key16+sms_expire_key17+sms_expire_key18+sms_expire_key19+sms_expire_key20)
sms_expire_key21_30 =(sms_expire_key21+sms_expire_key22+sms_expire_key23+sms_expire_key24+sms_expire_key25
                      +sms_expire_key26+sms_expire_key27+sms_expire_key28+sms_expire_key29+sms_expire_key30)
sms_expire_key31_50 =(sms_expire_key31+sms_expire_key32+sms_expire_key33+sms_expire_key34+sms_expire_key35
                      +sms_expire_key36+sms_expire_key37+sms_expire_key38+sms_expire_key39+sms_expire_key40+
                                 sms_expire_key41+sms_expire_key42+sms_expire_key43+sms_expire_key44+sms_expire_key45+
                                 sms_expire_key46+sms_expire_key47+sms_expire_key48+sms_expire_key49+sms_expire_key50)

sms_expire_key51_70 = (sms_expire_key51+sms_expire_key52+sms_expire_key53+sms_expire_key54+sms_expire_key55
                      +sms_expire_key56+sms_expire_key57+sms_expire_key58+sms_expire_key59+sms_expire_key60+
                    sms_expire_key61+sms_expire_key62+sms_expire_key63+sms_expire_key64+sms_expire_key65
                    +sms_expire_key66+sms_expire_key67+sms_expire_key68+sms_expire_key69+sms_expire_key70
                       +sms_expire_key71+sms_expire_key72+sms_expire_key73+sms_expire_key74+sms_expire_key75+sms_expire_key76
                                 )

sms_expire_key = sms_expire_key1_10+sms_expire_key11_20+sms_expire_key21_30+sms_expire_key31_50+sms_expire_key51_70
sms_expire_key = sms_expire_key.lower()





sms_bill_key1 = "outstanding loan|credit limit is now php|outstanding balance|outstanding Bal| bill |statement "
sms_bill_key2 = "|credit limit is now \d+|balance.* loan|Home Loan|billername|billers name|bill cutoff"
sms_bill_key3 = "|total bill|your total amount due p|total amount due php|biller name|bill payment|billing statement"
sms_bill_key4 = "|loan amount of \d+|credit limit is php|may balanse na \d+|bill amount|gcash biller|you are attempting to cash out"
sms_bill_key5 = "|you are attempting to send \d+ php|you have received a payment from coins account|have received a \d+ of 2710 php"
sms_bill_key6 = "|you have successfully added \d+ php|your gcash account is now topped up|contract no|credit card statement|billing date"
sms_bill_key7 ="|\d+ bill|paymaya account to (skypay|sun life canada|my catv)|bank transfer to (dcpay coinsph|rcbcdiskartech) account"
sms_bill_key8 ="|current bill|your cashalo powered by paloo account by paying|bills payment|biller skypay|Billing Details"
sms_bill_key9 = "|utility bill|loan balance|credit card bills|payment details|successful biller|details from pera4u"
sms_bill_key = (sms_bill_key1+sms_bill_key2+sms_bill_key3+sms_bill_key4+sms_bill_key5+sms_bill_key6+sms_bill_key7+sms_bill_key8+sms_bill_key9
                +sms_bill_key9)
sms_bill_key = sms_bill_key.lower()

"""
re.search("due date (?!alert|warningwe)|para makapag","days at hindi due date alxert warningwe need your se  masu")
re.search("(?<!hindi magkaroon ng) past due|para makapag","days at hindi x magkaroon ng past due interestmasu")
|(?<!no) collection (?!.*(?:message|collected by))| utang (?!na load)"
"""
"""  逾期  """

sms_overdue_key1 = " debtor | unsettled |rpc| delinquent |(?<!hindi magkaroon ng) past due|black list| nangutang "
sms_overdue_key2 = "|(?<!meron ka pang) utang (?!.*(?:load|ay inilipat sa iyong))| debt | unpaid (?!utang na load)| cic | obligation | obligations |Field Officer for visit|nagtatangka na mang scam sa "
#sms_overdue_key3 = "|(bayaran|mag|babayad|settle|hindi|balak|iwas|mahiya|inutulungan|paalala|magbayad|balewalain|pagbabayad) .* (utang|loan)"
sms_overdue_key3 = "|(bayaran|magbabayad|hindi|balak|iwas|mahiya|inutulungan|paalala|magbayad|balewalain|pagbabayad) .* loan"
sms_overdue_key4 = " pastdue | deliquency "
sms_overdue_key5 = "|barangay mediation for your account may possibly schedule"
sms_overdue_key6 = "|not received your payment|not been received"
sms_overdue_key7 = "familyrelativesfriendscolleaguecompany"
sms_overdue_key8 = "|ay walang bayad sa higit sa isang buwan upang hindi|anong oras kapo magbabayad"
sms_overdue_key9 = "|loan pero bakit hanggang ngayon hindi po naten ito sinisettle"
sms_overdue_key10 = "|repay your account immediate"
sms_overdue_key11 = "|any payment arrangement"
sms_overdue_key12 = "|remind you for settlement"
sms_overdue_key13 = "|loan principal mo ito mababawas hindi sa penalties dahil waived na lahat ng penalties"
sms_overdue_key14 = "|over due|multiple attempts of reminders no payment|havent received your payment"
sms_overdue_key15 = "|pakisettle napo ang perang hineram"
sms_overdue_key16 = "|numerous reminders and attempts to contact you"
sms_overdue_key17 = "|declared reference|kabila ng paulitulit namin na paalala na bayaran na ang iyong balanse ng iyong maya credit account"
sms_overdue_key18 = "|dropped our call when you learned that we are calling for your payment"
sms_overdue_key19 = "|settle ng maaga ng payment"
sms_overdue_key20 = "|loan \d+ ay wala pa ring bayad sa higit na isang buwan"
sms_overdue_key21 = "|penalty charge is added everyday"
sms_overdue_key22 = "|not yet paid"
sms_overdue_key23 = ""
sms_overdue_key24 = "|araw araw na penalty hanggat hindi na isesettle"
sms_overdue_key25 = "|mo mahiya naman kayo pinagkatiwalaa|social media gamit itong picture at id mo at mga proof"
sms_overdue_key26 = "|remind kami sayo \d+days before your duedate"
sms_overdue_key27 = "|bayad na kayo \d+days before due date|at least partial payment|atleast partial"
sms_overdue_key28 = "|familyrelativesfriendscolleaguecompany|kang mahiya pinautang"
sms_overdue_key29 = "|ugnayan sa inyong company at paghahanap ng inyong mga kakilala"
sms_overdue_key30 = "|please immediately pay p \d+ to restore your connection|hindi na matawagan ng aming team"
sms_overdue_key31 = "|no payment posted|kompanya ang bayad mo nagtatago kana matuto kang mahiya|pagmumukha mo bilang scammer|magkusa pag hinaras sila"
sms_overdue_key32 = "|given email given personal facebook"
sms_overdue_key33 = "|visit to your residential address"
sms_overdue_key34 = "|avoid contacting your provided references"
sms_overdue_key35 = "|lahat ng penalty sa account|maiclose ang iyong account"
sms_overdue_key36 = "|hindi naman natin kayang bayaranpaulit|lampas kana sa duedate"
sms_overdue_key37 = "|responsible settle your due account|last disbursement day"
sms_overdue_key38 = "|you can pay with an extension|total amount owed \d+|your outstanding loan .* numerous reminders|penalty sa iyong account"
sms_overdue_key39 = "|free yourself from paying interests and penalties|namarkahan na sya bilang sinungaling"
sms_overdue_key40 = "|enlisted to credit information corporation"
sms_overdue_key41 = "|still open if you settle the loan"
sms_overdue_key42 = "|apply for loan extension|atleast extension payment|another way to avoid penalties pay \d+"
sms_overdue_key43 = "|maclose ang iyong account|havent received your payment"
sms_overdue_key44 = "|pls pay your gsis eml arrears|not received recent payment"
sms_overdue_key45 = "|settle today salamat pomagbayad|repay \d+ today to reactivate your account"
sms_overdue_key46 = "|any update .* account|any update sa bayad"
sms_overdue_key47 = "|any update .* payment|any update we are still"
sms_overdue_key48 = "|still didnt received any repayment update"
sms_overdue_key49 = "|settle your due of php|days before due date"
sms_overdue_key50 = "|still not paying your account"
sms_overdue_key51 = "|no visible payment"
sms_overdue_key52 = "|times have we called you|account over to our company attorney|kaibigankamaganakkakilalakatrabaho|any payment update"
sms_overdue_key53 = "|loan \d+ by settling p\d+|sasampa ng kaso sa iyo ang|several attempts of communication"
sms_overdue_key54 = "|payment mo may plano"
sms_overdue_key55 = "|collector officer|pay atleast php|wala pa kayong bayad"
sms_overdue_key56 = "|(?<!avoid) overdue|no payment|settlement and agreement"
sms_overdue_key57 = "|balita sa inyong pagbabayad"
sms_overdue_key58 = "|loan will be closed hurry before \d+"
sms_overdue_key59 = "|hindi.* (bayad|babayad|pagbayad|magbayad|bayad|nababayaran|payment|padin|nakikipag|pagbabayad|bayaranpaulit|nagreresponse|pagkakabayad|penalties|nagpapautang|nagbabayad)"
sms_overdue_key60 = "|makikisuyo na po ng bayad mo"
sms_overdue_key61 = "|aasahan pa poba kami na payment|mo po planong bayaran po itong"
sms_overdue_key62 = "|san napo ang payment mo po"
sms_overdue_key63 = "|once na nasettle niyo ang inyong account before"
sms_overdue_key64 = "|pasuyo napo ulit ako sa payment niyo ngayon|asan na ho yung payment mo"
sms_overdue_key65 = "|wala padin po ang payment|close your (loan|account)|makipag coordinate about sa loan po ninyo"
sms_overdue_key66 = "|didnt see any (payment|repayment) under your account|relatives and social media friends"
sms_overdue_key67 = "|blocklisting|referenceemergency"
sms_overdue_key68 = "|referencetrababo"
sms_overdue_key69 = "| obligasyon "
sms_overdue_key70 = "|pakisettle napo ang perang hineram|not received any payment"
sms_overdue_key71 = "|social media|avoid external agency endorsement|na po pero di ka pa din po nakakapag settle ng payment"
sms_overdue_key72 = "|office of atty|id ng gobyerno at larawan|responsable naman pong tao mahiya"
sms_overdue_key73 = "|magbayad sa hiram mo"
sms_overdue_key74 = "| inutang |negative file information system|credit information corporation"
sms_overdue_key75 = "| nbi "
sms_overdue_key76 = "|id mo at address|pakisend na po ang payment|pagbaliwala sa loan"
sms_overdue_key77 = "|pagdidisburse ng reloan|pagblock pag ignore hindi pagrereply sa mga sms|municipal trial court| metropolitan trial court"
sms_overdue_key78 = "|dapat ng bayaran"
sms_overdue_key79 = ""
sms_overdue_key80 = "|only principal amount to pay"
sms_overdue_key81 = "|take you to court|no longer pay|plano .* (utang|bayad|magbayad|loan|account)"
sms_overdue_key82 = "|id at mukha|nakalimutan mo na ata yung loan"
sms_overdue_key83 = "|ano na magbabayad|hindi parin na sesettle|kahihiyan magbayad|nasaan na ang bayad"
sms_overdue_key84 = "|ano (na|ng).* (plano|balak)|(close|closing|closed).* account (?!thank you)"
sms_overdue_key85 = "|ano na pong balita.* loan|(?<!reply done)update.* (payment|bayad|utang|bayad|loan)|ano nasaan na ang payment mo dito"
sms_overdue_key86 = "|ano update sa (utang|settlement)|anong balita sa bayad"
sms_overdue_key87 = "|dapat bayad"
sms_overdue_key88 = "|wala .* (balak|payment|bayaran|magbayad|bayad|account)|anong oras po ba kayo (magbabayad|makakapag)"
sms_overdue_key89 = "| fdcpa |mga kakilala sa facebook"
sms_overdue_key90 = "|update ng settlement ng account|id mo and picture mo|law office"
sms_overdue_key91 = "|criminal case"
sms_overdue_key92 = "|account is now considered highrisk|mang scam|pls pay your gsis cnl arrears"
sms_overdue_key93 = "|not repay your eperash loan|case to the higher department|demand letter| ba sa pag bayad ng loan"
sms_overdue_key94 = "|your account with the credit bureau|failed to comply with your promised payment"
sms_overdue_key95 = "|suggest you pay now|magbabayad po ba"
sms_overdue_key96 = "|dont receive any feedback|not obtain the payment"
sms_overdue_key97 = "|naghihintay sa pagsettle ng inyong payment| mong sinungaling ka"
sms_overdue_key98 = "|accepting partial payment|field collecting office|commence suit|over for several days"
sms_overdue_key99 = "|post loan investigation|law firm|no intention to repay|follow .* (payment|bayad|settlement)"
sms_overdue_key100 = "|to be paid is p|avail our repayment extension|small claims|not receiving any payment"
sms_overdue_key101 = "|pakibayaran na po ngayon|pakisettle na lng po ng payment|(?<!avoid) late payment| never stop until your loan is settled"
sms_overdue_key102 = "|not been paid|contact refference|not willing to settle your"
sms_overdue_key103 = "|close of your debt|maging obligado|late charges|account will be closed|not receive the payment"
sms_overdue_key104 = "|not yet settle|if (you|you can) settle your account|expired for almost 2 months already|overdue days"
sms_overdue_key105 = "|last chance to settle|nadeklarang reference|manloloko ka|(?<!subscription) has expired|forget to pay"
sms_overdue_key106 = "|firmly suggest you to settle|credit limit remains suspended|tulong sa pagbayad ng iyong loan|discuss the payment"
sms_overdue_key107 = "|have expired malicious|principal lang ang binayaran at naclose|been trying to reach out to you regarding the pending"
sms_overdue_key108 = "|must be paid|settle your payment until \d|ignore payment|not made the payment|(?<!avoid) late penalty"
sms_overdue_key109 ="|need to settle asap before|immediate payment|hurry settle your account"
"""
注销 
account is still unpaid|unsettled eto account|unsettled parin ang inyong account|unpaid loan
|ph is unpaid|remains unpaid|many times but youre still unpaid settle payment|settle your unpaid amount
|unpaid balance|loan account remains \d+ months unpaid|many times but youre still unpaid settle payment|you still unpaid your previous loan
|still have unsettled account|remains unsettled|loan is still unsettled
|bayaran .* inutang|delinquent status|due na kahapon
|dito sa utang|bigla lang iaware sa utang mo mahiya|inutulungan sa utang niyo po|aware po kayo sa utang niyo|sa kakadeserve mo ayan baon ka sa utang
|pag bayad ng utang|pagbabayad po ng utang|utang ay binabayaran hindi tinataguan|utang ay dapat kusang binabayaran|utang ay utang|utang binabayaran hindi
|utang binabayaran yan hindi|utang mo dito|utang po hindi|kalang sa utang|dedma tlaga sa utang|utang na inyong tinatakasan
|send your negative credit record to cic|transfer your account to cic
|loan obligation|payment obligation|face your obligation|
|pastdue bat di pa rin nakakapagbayad|pastdue na at malapit|accounts pastdue balance
|posibleng gumawa na sila ng legal aksyon|gumawa na sila ng legal aksyon na posibleng|ay inindorso sa mcgrath arthur dumulog sa legal
|legal department|contact reference|legal action|madaling panahon legal department|legal avenues|legal collection|legal team|legal proceeding
|legal department head office|legal and binding
|Vicente Carambas Legal
|legal na aksyon
|legal escalation
|legal na proseso|face recognition
|legal counselforget to pay
|legal office|gampanan ang obligasyon|maalala mo na may obligasyon ka pong dapat bayaran po
|posted to the social media and black list
"""
# re.search("(ano|anong) (po|ng|na|nang|napo|napong) update.* (payment|bayad|utang|bayad|loan)","anong update sa bayad mo 11am na ho paki process")

# 不能匹配放款 还款 到期

sms_overdue_key1_30 = (sms_overdue_key1+sms_overdue_key2+sms_overdue_key3+sms_overdue_key4+sms_overdue_key5
                      +sms_overdue_key6+sms_overdue_key7+sms_overdue_key8+sms_overdue_key9+sms_overdue_key10
                        +sms_overdue_key11+sms_overdue_key12+sms_overdue_key13+sms_overdue_key14+sms_overdue_key15
                        +sms_overdue_key16+sms_overdue_key17+sms_overdue_key18+sms_overdue_key19+sms_overdue_key20
                      +sms_overdue_key21+sms_overdue_key22+sms_overdue_key23+sms_overdue_key24+sms_overdue_key25
                      +sms_overdue_key26+sms_overdue_key27+sms_overdue_key28+sms_overdue_key29+sms_overdue_key30
                       )

sms_overdue_key31_60 = (sms_overdue_key31+sms_overdue_key32+sms_overdue_key33+sms_overdue_key34+sms_overdue_key35
                        +sms_overdue_key36+sms_overdue_key37+sms_overdue_key38+sms_overdue_key39+sms_overdue_key40
                        +sms_overdue_key41+sms_overdue_key42+sms_overdue_key43+sms_overdue_key44+sms_overdue_key45
                        +sms_overdue_key46+sms_overdue_key47+sms_overdue_key48+sms_overdue_key49+sms_overdue_key50
                        +sms_overdue_key51+sms_overdue_key52+sms_overdue_key53+sms_overdue_key54+sms_overdue_key55
                        +sms_overdue_key56+sms_overdue_key57+sms_overdue_key58+sms_overdue_key59+sms_overdue_key60
                        +sms_overdue_key61+sms_overdue_key62+sms_overdue_key63+sms_overdue_key64+sms_overdue_key65
                        +sms_overdue_key66+sms_overdue_key67+sms_overdue_key68+sms_overdue_key69+sms_overdue_key70
                        +sms_overdue_key71+sms_overdue_key72+sms_overdue_key73+sms_overdue_key74+sms_overdue_key75
                        +sms_overdue_key76+sms_overdue_key77+sms_overdue_key78+sms_overdue_key79+sms_overdue_key80
                        +sms_overdue_key81+sms_overdue_key82+sms_overdue_key83+sms_overdue_key84+sms_overdue_key85
                        +sms_overdue_key86+sms_overdue_key87+sms_overdue_key88+sms_overdue_key89+sms_overdue_key90
                        +sms_overdue_key91+sms_overdue_key92+sms_overdue_key93+sms_overdue_key94+sms_overdue_key95
                        +sms_overdue_key96+sms_overdue_key97+sms_overdue_key98+sms_overdue_key99+sms_overdue_key100
                        +sms_overdue_key101+sms_overdue_key102+sms_overdue_key103+sms_overdue_key104+sms_overdue_key105
                        +sms_overdue_key106+sms_overdue_key107+sms_overdue_key108+sms_overdue_key109
                        )
sms_overdue_key = sms_overdue_key1_30+sms_overdue_key31_60
sms_overdue_key = sms_overdue_key.lower()


# 不能匹配放款 还款 到期

sms_overdue_serious_key1 = "blocklisting|referenceemergency| law |(?<!no)(?<!scam)(?<!application)(?<!lamang ang) collection (?!.*(?:message|collected by|namin hindi sila mang haharass))"
sms_overdue_serious_key2 = "|referencetrababo|contact reference|(?<!on)(?<!at) social media|office of atty|id ng gobyerno at larawan"
sms_overdue_serious_key3 = "|negative file information system|credit information corporation| nbi "
sms_overdue_serious_key4 = "|id mo at address|municipal trial court| metropolitan trial court|take you to court"
sms_overdue_serious_key5 = "|id at mukha|fb friends| fdcpa |mga kakilala sa facebook|blacklisting|id mo and picture mo|blacklist"
sms_overdue_serious_key6 = "|criminal case|act of fraud|risk collection| cic "
sms_overdue_serious_key7 = "|You have withdrawn PHP|demand letter|your account with the credit bureau"

sms_overdue_serious_key8 = "|field collecting office|commence suit|post loan investigation"
sms_overdue_serious_key9 = "|small claims|contact refference|(?<!self info) emergency contacts (?!.*(?:for verification))"
sms_overdue_serious_key10 = "| rpc |block list|deaclared contacts|delinquency|clear your name kindly"
sms_overdue_serious_key11 = "|home address|legal office|koleksyon na thirdparty|avoid possible field visit|contacte reference"
sms_overdue_serious_key12 = "|visitation in your address| legal (?!electronic game)"
sms_overdue_serious_key = (sms_overdue_serious_key1+ sms_overdue_serious_key2+sms_overdue_serious_key3+sms_overdue_serious_key4+sms_overdue_serious_key5
                           +sms_overdue_serious_key6+sms_overdue_serious_key7+sms_overdue_serious_key8+sms_overdue_serious_key9+sms_overdue_serious_key10
                           +sms_overdue_serious_key11+sms_overdue_serious_key12)

sms_overdue_serious_key = sms_overdue_serious_key.lower()

"""
注销
law office|law firm|collection department|collection office|department of collection|risk collection
|face recognition
"""
sms_ls_key = "nakareceive ng php|sent php \d+ to your|"

"""
删除 |^\d\d\d\d 

短信特征 新增短信长度
"""

sms_verif_key1=  "registration your password|code for confirmation"
sms_verif_key2 = "|token is \d+|finbroph temporary password is|helppesoredeeph code"
sms_verif_key3 = "|registration code|verification code (?!be sure to connect)|verification otp|otp to login|verify ng code sa paglogin|is your sms code"
sms_verif_key4 =  "|is your verifly code|confirmation code|beripikasyon ay|your cde is"
sms_verif_key5 = "|login code|new password is"
sms_verif_key6 = "|verification number|code to reset your cashalo password is"
sms_verif_key7 = "|otp \d\d\d+ (?!for .* amount)(?!to proceed)(?!ref)(?!only if)(?!.*88777222)(?!in select rcbc)|your onetime pin otp|otp is \d+ (?!for .* trans)(?!if)(?!.*q0uxcqkihgz)(?!by linking)|\d+ is your otp"
sms_verif_key8 = "|your otpcode is \d+|otp to login is|your registration otp is|verification code\d+"
sms_verif_key = sms_verif_key1+sms_verif_key2+sms_verif_key3+sms_verif_key4+sms_verif_key5+sms_verif_key6+sms_verif_key7+sms_verif_key8
sms_verif_key = sms_verif_key.lower()

"""
注销 your code is \d\d\d\d  ||code is||(?<!payment)(?<!pay the) code is|your pesoloan otp is \d+|channelbank info pin

转账
bank transfer|send money|instapay transaction|sending money|transfer funds
verification code|(?<!phone)(?<!for) verification|
|onetime (code|password|pin)|one time (password|pin)|enter the code
"""

"""
housing loan|pagibig|housingauto loan|Motor Cycle|auto loan|credit card|motorcycle|home credit
"""